package com.hue.gulimail.gulimailauth.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: 姚凤桥
 * @Date: 2021/11/23 22:17
 * @Description: 配置视图跳转逻辑，省略掉在Controller中写视图跳转的空方法
 */
@Configuration
public class ViewConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("login.html").setViewName("index");
        registry.addViewController("register.html").setViewName("register");
    }
}
